import sys

from PySide2.QtWidgets import QApplication, QMainWindow, QPushButton


class MainWindow(QMainWindow):
    def __init__(self):
        super().__init__()

        self.setWindowTitle("My App")

        button = QPushButton("Press Me!")
        button.setCheckable(True)
        button.clicked.connect(self.onButtonClicked)
        button.clicked.connect(self.onButtonToggled)

        self.setCentralWidget(button)

    def onButtonClicked(self):
        print("Clicked!")
    
    def onButtonToggled(self, checked):
        print("Clicked!", checked)


app = QApplication(sys.argv)

window = MainWindow()
window.show()

app.exec_()